<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>浮动</title>
		<style>
			#d1{
				border: 2px gold groove;
				overflow: hidden;
			}
			#d1 div{
				height: 100px;
				width: 100px;
				margin: 4px;
				background-color: blue;
				color: white;
				font-size: 30px;
				line-height: 100px;
				text-align: center;
				float: left;
			}
			h3#adv{
				border: 1px red solid;
				float: left;
				width: 240px;
				
				/* clear: both;后面的元素还是浮动，要和h3并列 */
			}
			 
		</style>
	</head>
	<body>
		<div id="d1">
			<div>1</div>
			<div>2</div>
			<div>3</div>
			<div>4</div>
			<div>5</div>
			<div>6</div>
			<div  style="height: 500px;">7</div>
			<div>8</div>
			<div>9</div>
		</div>
		<h3 id="adv">许宝林是个好同志</h3>
		 
	</body>
</html>